#pragma once

#include "Buffer.h"

class DataOutStream
{
public:
	CONSTRUCTOR DataOutStream();
	DESTRUCTOR ~DataOutStream();

	void SetFileName(const String& fileName);
	String GetFileName();

	void Clear();

	bool Save(Buffer& buffer);

	s32 GetPosition() const;

	void Write(const c8* buffer, u32 num);

	void WriteChar(c8 Char);
	void WriteInt(s32 Int);
	void WriteFloat(f32 Float);
	void WriteByte(u8 Byte);
	void WriteWord(u16 Word);
	void WriteDWord(u32 DWord);
	void WriteString(const String& string, u32 size);

protected:
	s32 mPos;
	std::vector<c8> mData;
	String mFileName;
};